var serverUrl = "http://localhost:8080";
//var serverUrl = "http://193.112.141.169";
const proxy = {
  "/api": {
    target: process.env.VUE_APP_CORE_HOST_URL || serverUrl,
    changeOrigin: true,
    pathRewrite:{       //必须配置
      '^/api': '/api'
    }
  },
  "/upload": {
    target: "http://193.112.141.169",
    changeOrigin: true,
    pathRewrite:{       //必须配置
      '^/upload': '/upload'
    }
  },
  "/mmbiz_jpg": {
    target: "https://mmbiz.qpic.cn",
    changeOrigin: true,
    pathRewrite:{       //必须配置
      '^/mmbiz_jpg': '/mmbiz_jpg'
    }
  }
}
//const webpack = require("webpack")
module.exports = {
  devServer: {
    proxy,
    headers:{'Access-Control-Allow-Origin':'https://mp.weixin.qq.com'}
  },
  configureWebpack: {
    plugins: [
      // new webpack.ProvidePlugin({
      //     'window.Quill': 'quill/dist/quill.js',
      //     'Quill': 'quill/dist/quill.js'
      // })
    ]
  }
}
